package com.magpiebridge.service.Impl;

import com.magpiebridge.dao.MissDao;
import com.magpiebridge.pojo.Miss;
import com.magpiebridge.service.MissService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MissServiceImpl implements MissService {

    @Autowired
    private MissDao missDao;

    @Override
    public List<Miss> getAllMiss(){
        return missDao.selectList(null);
    }

    @Override
    public Miss getMissById(Integer id) {
        return missDao.selectById(id);
    }

    @Override
    public int insertMiss(Miss miss) {
        return missDao.insert(miss);
    }

    @Override
    public int updateMiss(Miss miss) {
        return missDao.updateById(miss);
    }

    @Override
    public int deleteMiss(Integer id) {
        return missDao.deleteById(id);
    }


}
